-vSvnc-tExport path=/opt/subversion/Bin: $PATHmaster="HTTP:YOURSVN"functionMyhelp_fn () {Echo '-V: Introduction. -M: Accept my conflict. -T: Accept his conflict.r:revert svnopc: Displays files with only attribute conflicts. Acceptable Parameters-v,-m,-T. and the specific file name, if it is a specific filename will be the. prej file together. SVNOPM: Displays only files that have changed properties. Acceptable Parameters-R. Svnc: Displays all conflicting files. is acceptable-m,-T. Svnmm:merge ba
Tags: case nbsp deb echo users Userdel turn on debug--Create a script admin.shPerform the following functions:-H | --HELP: Providing Help information--add users: Completing user additions-del User | --delete: Complete User deletion-V: Turn on debug mode, display informationYou can use all of the above commands at the same time#!/bin/Bash#debug=0ADD=0DELETE=0 forIinch`seq 1 $#` Do Case$1 inch-h|--Help )Echo "--v--help--add--delete--userlist" ;;-v|--Versbo) DEBUG=1 Shift ;;--a
Python implements three lines of code to solve a simple one-dimensional equation and three lines of python.
The example described in this article is that Python uses three lines of code to solve the one-dimensional equation. The code is concise and efficient. The specific usage is as follows:
>>> solve("x - 2*x + 5*x - 46*(235-24) = x + 2")3236.0
The function code is as follows:
def solve(eq,var='x'): eq1 = eq.replace("=","-(")+")" c = eval(
Because I usually write some small experimental script, every time to write author,description and so very troublesome, then wrote such a script can create their own small script, code as follows, pure personal original, relatively rough, big God do not spray#!/bin/bash#ver=0aut=0tim=0des=1if[$#-lt1];then echo "' Basename$0 ' :-a|--author|-t|-d|-v|-f|--file/path/to/file| -H "exit3fiwhile[$#-ge1]; Docase$1in-v|--version) VER=1 shift;; -H|--HELP) echo "' Basename$0 ' :-a|-- Author|-t|-d|-v|-f|--
User2 is unable to log in, through the control group to restrict the user to log on to the server6. Script Automatic implementation of judgment#!/bin/bashfunctionget_gid () {ldapsearch-xgidnumber-b "cn=$1,ou=group,dc=vxuepin,dc=com" 2>/dev/null|grep "^gidnumber" | awk ' {print$2} '}functionfilter_on_centos5 () { #samples: #nss_base_passwd dc=vxuepin,dc=com?sub?gidNumber=1000 #nss_base_passwd dc=vxuepin,dc=com?sub?| (gidnumber=1000) (gidnumber=1003) cp/etc/ldap.conf/etc/ldap.conf. ' date+%Y%m
The recent period of time should be a lot of adjustments to modify the Nagios monitoring policy so need to re-restart Nrpe, but after Nagios installation is not provided Nrpe startup script, so I wrote a Nrpe for the usual restart:#!/bin/sh#thestartupscriptfornrpe#author:jim#processname:nrped#chkconfig: 23459703#description:Thisisadaemonusedfornrpe Startupmanagementinnagios#sourcefunctionslibraryif[-f/etc/rc.d /init.d/functions];then./etc/rc.d/init.d/functionselif[- f/etc/init.d/functions];then.
#!/bin/bash#author: The Adventures of Tintin (Jacob) #定义数组, save all the possibilities of Punch game= (stone scissors cloth) num=$[random%3]computer=${game[$num]}# Get the punch of a computer by random number # The possibility of a punch is saved in an array, game[0],game[1],game[2] is 3 different possible echo "Please choose your punch gesture according to the following tips" echo "1. Stone "echo" 2. Scissors "echo" 3. Cloth "read-p" Please select 1-3: "person# prompts the user to punch, Acco
element, adding an array of 1-9 to the element that has no value. for($i= 0;$i -lt9;$i++){ for($j= 0;$j -lt9;$j++){ if(!$SudokuMatrix[$i][$j]){ $SudokuMatrix[$i][$j] = 1..9 }Else{ $SudokuMatrix[$i][$j] = @($SudokuMatrix[$i][$j]) } }}#loop each element, comparing horizontal and vertical data, from removing all possible values. functionGoloop ($arr){ $NEWARR= @($null) * 9 for($i= 0;$i -lt9;$i++){ $NEWARR[$i] =$arr[$i]. Psobject.copy ()}
#installipvsadmrpm-qipvsadm>/dev/ null// Installing the IPVSADM command-line tool If[$?-eq1];thenyuminstall-yipvsadm >/dev/nullfi#definevariableipvsadm= ' Whichipvsadm ' vip=172.16.16.2rs1=172.16.16.3rs2= 172.16.16.4#ifconfigeth0:0vipifconfigeth0:0 $VIP/32broadcast $VIP up# definelvs-dr$IPVSADM-C //Purge rule $ipvsadm-a-t $VIP:3306-slblc //define MySQL Cluster service $ipvsadm-a-t $VIP:3306-r $RS 1:3306-g //Add node to the DR model of the MySQL Clust
This article mainly introduces how to implement three lines of code in Python to solve a simple one-dimensional equation, which is suitable for beginners of Python to learn from, you can refer to the example described in this article to use three lines of code to solve the one-dimensional equation. the code is concise and efficient. the usage is as follows:
>>> Solve ("x-2 * x + 5 * x-46 * (235-24) = x + 2") 3236.0
The function code is as follows:
Def solve (eq, var = 'x'):
files : upload.shpath : $HOME/ggscript/gguploadFunction: The script will not be used directly, to meet other scripts to upload information and design, directly within the script to upload the corresponding file informationHe reads system configuration information in the System Information Profile SysInfoExample[detest#]Ip-mtmyljeyms4xmdeuodykusername-z2dzcg==Password-z2dzxxxxxxPort-mjikPath-l2rhdgexl2dncy9nz3nlcnzlci9kaxjkzwyk[#detest]The above information is encrypted with Base64, ensuring info
/etc directory to the/backups directory and name it/backups/ etc-20160613.tar.bz2; (3) If the value of parameter 1 is XZ, use the tar and XZ archives to compress the/etc directory to the/backups directory and name/backups/etc-20160613.tar.xz; (4 ) Any other value, the error compression tool is displayed, and an abnormal exit is performed; #!/bin/bashif[$#-eq1];then case$1in "gzip") tar-zcf/backup/etc-' Date+%F '. tar.gz /etc/*;; "bzip2") tar-j
Recently in the study of shell programming, idle to do nothing, to engage in a small shell. can be used to detect the surviving host of a network segment.1#!/bin/Bash2 #3#Date: the/ A/ -4#blog: www.cnblogs.com/Outline5 #by: Joe6 7 if[$#-lt1] ; Then8 Echo "err, usage:ping.sh ARg"9 Echo "eg:ping.sh 192.168.1"TenExit8 One fi A -ips=" $" - Stat=1 the forIpinch$(seq 1 254) - Do - Ping-C1${IPS}.${IP} >/dev/NULLStat=1||Stat=0 - if[ $Stat-eq1]; Th
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.